<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
     <%@page import="net.sf.json.JSONObject" language="java"  %>
    <%@ taglib uri="http://jawr.net/tags" prefix="jwr" %>

<%
	JSONObject jsonResp = (JSONObject)request.getAttribute("jsonResp");
%>

<html>
<base href="${pageContext.request.requestURL }"/>
<head>


<jwr:style src="/bundles/extJs.css" />
<jwr:style src="/bundles/apps.css" />
<jwr:script src="/bundles/extJs.js"/> 
<jwr:script src="/bundles/common.js"/> 
<jwr:script src="/bundles/component.js"/> 
<jwr:script src="/bundles/customize.js"/> 

<script language="javascript" type="text/javascript">
	document.write("<iframe id='downloadFrame'  style='display: none'></iframe> ");
	var withAdvancedSearch = false;
	
	var advancedSearchManageRightFlag = false;
	var jsonResp = <%=jsonResp%>;
	var fieldSet = jsonResp.fieldSet;
	var postData = jsonResp.postData;
	var gridPanel = jsonResp.gridPanel;
    var win = jsonResp.win;
	//组装records
	var dataObj = new Object();
	dataObj.data = postData;
	var dataArray = new Array();
	dataArray[0]=dataObj;
	
	var CONFIG_LL_HEADER = false;
	
	Ext.onReady(function(){ 
		
		Ext.namespace('VAS');
		if(typeof(fieldSet) === 'object'){
			new VAS.DynamicEditForm({
				renderTo: "audit_common",
				fieldSet: fieldSet,
				records : dataArray,
				height :  win.height,
				width  :  '100%'
			});
		}else{
			Ext.MessageBox.alert('失败', '没有配置要审核的内容，请配置');
		}

		if(typeof(gridPanel) === 'object'){
			height = typeof(gridPanel.height) == 'number' && gridPanel.height >1 ? gridPanel.height : 300;
			
			new VAS.CellEditorGrid({
				renderTo		  : "audit_common",
				title             : gridPanel.title,
				id                : gridPanel.id,
				gridUrl           : gridPanel.url,
				storeUrl          : gridPanel.storeUrl,
				rowNumberer       : true,
				checkboxSelModel  : true,
				sm                : new Ext.grid.CheckboxSelectionModel({
										defaults : {
											sortable : true	
										}
									}),
				autoScroll			: 	true,
				autoWidth			: true,
				lisenters         : {},
//				gridPanelParams  : postData,
				height            :  height,
//				width             :  gridPanel.width,
				menuid			   : win.menuid,
				gridPanelParams    : gridPanel.params
			});
		}
	})

</script>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>ADAMS</title>
</head>
<body >
<div id="audit_common"></div>
</body>
</html>